package com.zhou.common.operator.log.storage.mybatis.domain;

import com.zhou.common.operator.log.core.model.OperateLogInfo;

public class OperateLogRecordConveter {


    public static OperateLogRecord OperateLogConveter(OperateLogInfo info) {
        OperateLogRecord operateLogRecord = new OperateLogRecord();
        operateLogRecord.setAction(info.getAction());
        operateLogRecord.setAddTime(info.getAddTime());
        operateLogRecord.setResource(info.getResource());
        operateLogRecord.setRemark(info.getRemark());
        operateLogRecord.setBusinessId(info.getBusinessId());
        operateLogRecord.setOrgId(info.getPrincipal().getOrgId());
        operateLogRecord.setOrgName(info.getPrincipal().getOrgName());
        operateLogRecord.setUserId(info.getPrincipal().getUserId());
        operateLogRecord.setUserName(info.getPrincipal().getUserName());
        operateLogRecord.setUserPhone(info.getPrincipal().getUserPhone());
        operateLogRecord.setClientIp(info.getClientInfo().getClientIp());
        operateLogRecord.setBrowser(info.getClientInfo().getBrowser());
        operateLogRecord.setBrowserVersion(info.getClientInfo().getBrowserVersion());
        operateLogRecord.setServerIp(info.getClientInfo().getServerIp());
        operateLogRecord.setOs(info.getClientInfo().getOs());
        operateLogRecord.setMacAddress(info.getClientInfo().getMacAddress());
        operateLogRecord.setOperatingSystem(info.getOperatingSystem());
        operateLogRecord.setOperatingModule(info.getOperatingModule());
        operateLogRecord.setOperatingType(info.getOperatingType());
        operateLogRecord.setOperatingInstruction(info.getOperatingInstruction());
        return operateLogRecord;
    }
}

